package fly.shared;

public class FlyQueue<T>
{
	private FlyQueue<T> prev = null;
	private FlyQueue<T> next = null;
	
	private T data = null;
	
	public FlyQueue()
	{
		prev = this;
		next = this;
	}
	
	
	public void Add(T data)
	{
		this.prev.next = new FlyQueue<T>();
		this.prev.next.data = data;
		
		this.prev = this.prev.next;
		this.prev.next = this;
		
		this.prev.prev = null;
	}
	
	
	public T Get()
	{
		T t = this.next.data;
		
		this.next = this.next.next;
		
		return t;
	}
}





















